import 'package:xin_he/generated/json/base/json_convert_content.dart';
import 'package:xin_he/page/mine/xin_he_mine_orders/model/xin_he_order_item_model_entity.dart';

XinHeOrderItemModelEntity $XinHeOrderItemModelEntityFromJson(Map<String, dynamic> json) {
	final XinHeOrderItemModelEntity xinHeOrderItemModelEntity = XinHeOrderItemModelEntity();
	final String? buyerRemark = jsonConvert.convert<String>(json['buyerRemark']);
	if (buyerRemark != null) {
		xinHeOrderItemModelEntity.buyerRemark = buyerRemark;
	}
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		xinHeOrderItemModelEntity.code = code;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		xinHeOrderItemModelEntity.createTime = createTime;
	}
	final String? distributionType = jsonConvert.convert<String>(json['distributionType']);
	if (distributionType != null) {
		xinHeOrderItemModelEntity.distributionType = distributionType;
	}
	final int? freightFee = jsonConvert.convert<int>(json['freightFee']);
	if (freightFee != null) {
		xinHeOrderItemModelEntity.freightFee = freightFee;
	}
	final int? goodsFee = jsonConvert.convert<int>(json['goodsFee']);
	if (goodsFee != null) {
		xinHeOrderItemModelEntity.goodsFee = goodsFee;
	}
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		xinHeOrderItemModelEntity.id = id;
	}
	final String? mobile = jsonConvert.convert<String>(json['mobile']);
	if (mobile != null) {
		xinHeOrderItemModelEntity.mobile = mobile;
	}
	final int? orderAmount = jsonConvert.convert<int>(json['orderAmount']);
	if (orderAmount != null) {
		xinHeOrderItemModelEntity.orderAmount = orderAmount;
	}
	final int? orderFee = jsonConvert.convert<int>(json['orderFee']);
	if (orderFee != null) {
		xinHeOrderItemModelEntity.orderFee = orderFee;
	}
	final List<XinHeOrderItemModelOrderItems>? orderItems = jsonConvert.convertListNotNull<XinHeOrderItemModelOrderItems>(json['orderItems']);
	if (orderItems != null) {
		xinHeOrderItemModelEntity.orderItems = orderItems;
	}
	final int? orderPayFee = jsonConvert.convert<int>(json['orderPayFee']);
	if (orderPayFee != null) {
		xinHeOrderItemModelEntity.orderPayFee = orderPayFee;
	}
	final String? payTime = jsonConvert.convert<String>(json['payTime']);
	if (payTime != null) {
		xinHeOrderItemModelEntity.payTime = payTime;
	}
	final int? preferentialFee = jsonConvert.convert<int>(json['preferentialFee']);
	if (preferentialFee != null) {
		xinHeOrderItemModelEntity.preferentialFee = preferentialFee;
	}
	final String? remark = jsonConvert.convert<String>(json['remark']);
	if (remark != null) {
		xinHeOrderItemModelEntity.remark = remark;
	}
	final int? remindSend = jsonConvert.convert<int>(json['remindSend']);
	if (remindSend != null) {
		xinHeOrderItemModelEntity.remindSend = remindSend;
	}
	final String? remindSendTime = jsonConvert.convert<String>(json['remindSendTime']);
	if (remindSendTime != null) {
		xinHeOrderItemModelEntity.remindSendTime = remindSendTime;
	}
	final String? sellerIconPath = jsonConvert.convert<String>(json['sellerIconPath']);
	if (sellerIconPath != null) {
		xinHeOrderItemModelEntity.sellerIconPath = sellerIconPath;
	}
	final String? sellerName = jsonConvert.convert<String>(json['sellerName']);
	if (sellerName != null) {
		xinHeOrderItemModelEntity.sellerName = sellerName;
	}
	final int? sellerUserId = jsonConvert.convert<int>(json['sellerUserId']);
	if (sellerUserId != null) {
		xinHeOrderItemModelEntity.sellerUserId = sellerUserId;
	}
	final String? sendTime = jsonConvert.convert<String>(json['sendTime']);
	if (sendTime != null) {
		xinHeOrderItemModelEntity.sendTime = sendTime;
	}
	final int? shopId = jsonConvert.convert<int>(json['shopId']);
	if (shopId != null) {
		xinHeOrderItemModelEntity.shopId = shopId;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		xinHeOrderItemModelEntity.status = status;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		xinHeOrderItemModelEntity.type = type;
	}
	final int? userId = jsonConvert.convert<int>(json['userId']);
	if (userId != null) {
		xinHeOrderItemModelEntity.userId = userId;
	}
	final String? userName = jsonConvert.convert<String>(json['userName']);
	if (userName != null) {
		xinHeOrderItemModelEntity.userName = userName;
	}
	return xinHeOrderItemModelEntity;
}

Map<String, dynamic> $XinHeOrderItemModelEntityToJson(XinHeOrderItemModelEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['buyerRemark'] = entity.buyerRemark;
	data['code'] = entity.code;
	data['createTime'] = entity.createTime;
	data['distributionType'] = entity.distributionType;
	data['freightFee'] = entity.freightFee;
	data['goodsFee'] = entity.goodsFee;
	data['id'] = entity.id;
	data['mobile'] = entity.mobile;
	data['orderAmount'] = entity.orderAmount;
	data['orderFee'] = entity.orderFee;
	data['orderItems'] =  entity.orderItems?.map((v) => v.toJson()).toList();
	data['orderPayFee'] = entity.orderPayFee;
	data['payTime'] = entity.payTime;
	data['preferentialFee'] = entity.preferentialFee;
	data['remark'] = entity.remark;
	data['remindSend'] = entity.remindSend;
	data['remindSendTime'] = entity.remindSendTime;
	data['sellerIconPath'] = entity.sellerIconPath;
	data['sellerName'] = entity.sellerName;
	data['sellerUserId'] = entity.sellerUserId;
	data['sendTime'] = entity.sendTime;
	data['shopId'] = entity.shopId;
	data['status'] = entity.status;
	data['type'] = entity.type;
	data['userId'] = entity.userId;
	data['userName'] = entity.userName;
	return data;
}

XinHeOrderItemModelOrderItems $XinHeOrderItemModelOrderItemsFromJson(Map<String, dynamic> json) {
	final XinHeOrderItemModelOrderItems xinHeOrderItemModelOrderItems = XinHeOrderItemModelOrderItems();
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		xinHeOrderItemModelOrderItems.createTime = createTime;
	}
	final int? fCreateUserId = jsonConvert.convert<int>(json['fCreateUserId']);
	if (fCreateUserId != null) {
		xinHeOrderItemModelOrderItems.fCreateUserId = fCreateUserId;
	}
	final int? fGoodsId = jsonConvert.convert<int>(json['fGoodsId']);
	if (fGoodsId != null) {
		xinHeOrderItemModelOrderItems.fGoodsId = fGoodsId;
	}
	final int? fGoodsPriceId = jsonConvert.convert<int>(json['fGoodsPriceId']);
	if (fGoodsPriceId != null) {
		xinHeOrderItemModelOrderItems.fGoodsPriceId = fGoodsPriceId;
	}
	final int? fOrderId = jsonConvert.convert<int>(json['fOrderId']);
	if (fOrderId != null) {
		xinHeOrderItemModelOrderItems.fOrderId = fOrderId;
	}
	final int? fUpdateUserId = jsonConvert.convert<int>(json['fUpdateUserId']);
	if (fUpdateUserId != null) {
		xinHeOrderItemModelOrderItems.fUpdateUserId = fUpdateUserId;
	}
	final int? fUserId = jsonConvert.convert<int>(json['fUserId']);
	if (fUserId != null) {
		xinHeOrderItemModelOrderItems.fUserId = fUserId;
	}
	final int? goodsAmount = jsonConvert.convert<int>(json['goodsAmount']);
	if (goodsAmount != null) {
		xinHeOrderItemModelOrderItems.goodsAmount = goodsAmount;
	}
	final int? goodsPrice = jsonConvert.convert<int>(json['goodsPrice']);
	if (goodsPrice != null) {
		xinHeOrderItemModelOrderItems.goodsPrice = goodsPrice;
	}
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		xinHeOrderItemModelOrderItems.id = id;
	}
	final int? itemPrice = jsonConvert.convert<int>(json['itemPrice']);
	if (itemPrice != null) {
		xinHeOrderItemModelOrderItems.itemPrice = itemPrice;
	}
	final String? remark = jsonConvert.convert<String>(json['remark']);
	if (remark != null) {
		xinHeOrderItemModelOrderItems.remark = remark;
	}
	final int? removed = jsonConvert.convert<int>(json['removed']);
	if (removed != null) {
		xinHeOrderItemModelOrderItems.removed = removed;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		xinHeOrderItemModelOrderItems.updateTime = updateTime;
	}
	final int? versionNum = jsonConvert.convert<int>(json['version_num']);
	if (versionNum != null) {
		xinHeOrderItemModelOrderItems.versionNum = versionNum;
	}
	final int? zoneType = jsonConvert.convert<int>(json['zoneType']);
	if (zoneType != null) {
		xinHeOrderItemModelOrderItems.zoneType = zoneType;
	}
	return xinHeOrderItemModelOrderItems;
}

Map<String, dynamic> $XinHeOrderItemModelOrderItemsToJson(XinHeOrderItemModelOrderItems entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['createTime'] = entity.createTime;
	data['fCreateUserId'] = entity.fCreateUserId;
	data['fGoodsId'] = entity.fGoodsId;
	data['fGoodsPriceId'] = entity.fGoodsPriceId;
	data['fOrderId'] = entity.fOrderId;
	data['fUpdateUserId'] = entity.fUpdateUserId;
	data['fUserId'] = entity.fUserId;
	data['goodsAmount'] = entity.goodsAmount;
	data['goodsPrice'] = entity.goodsPrice;
	data['id'] = entity.id;
	data['itemPrice'] = entity.itemPrice;
	data['remark'] = entity.remark;
	data['removed'] = entity.removed;
	data['updateTime'] = entity.updateTime;
	data['version_num'] = entity.versionNum;
	data['zoneType'] = entity.zoneType;
	return data;
}